package com.lxk.service;

import com.lxk.pojo.Auction;
import com.lxk.vo.AuctionModel;
import com.lxk.vo.AuctionShowModel;
import com.lxk.vo.PageModel;

import java.util.List;

/**
 * 秒杀service
 * @author JohnSoybean
 * @time 2020年3月13日
 */
public interface AuctionService {
	
	/**
	 * 设置新一期拍卖
	 * @param auction
	 * @return auctionId
	 */
	Integer setAuction(Auction auction);

	/**
	 * 获取拍卖总页数
	 * @param num
	 * @return
	 */
	Integer getTotalPages(Integer num);

	/**
	 * 获取拍卖记录分页
	 * @param pageIndex
	 * @param num
	 * @param totalPages
	 * @return
	 */
	PageModel<AuctionModel> selAuctionPage(Integer pageIndex, Integer num, Integer totalPages, Integer sort, Integer order);

	/**
	 * 按goodsId查找拍卖
	 * @param goodsId
	 * @return
	 */
	List<Auction> selAuctionByGoodsId(Integer goodsId);

	/**
	 * 更新拍卖
	 * @param auction
	 */
	void updateAuction(Auction auction);

	/**
	 * 查看最新拍卖信息
	 * @return
	 */
	AuctionShowModel showAuctionGoodsInfo();

}
